echo -------- format emmc
dd if=/dev/zero of=/dev/mmcblk1 bs=1 count=1024
fdisk /dev/mmcblk1 << EOF
n
p
1


a
1
t
c
p
w
EOF

sync

while [ ! -b /dev/mmcblk1p1 ];do
sleep 1
echo waitting emmc sync
done

sleep 1
mkfs.vfat /dev/mmcblk1p1

sync

mkdir /media/mmcblk1p1

mount -t vfat /dev/mmcblk1p1 /media/mmcblk1p1/
sleep 1

echo -------- copy file
cp /media/mmcblk0p1/* /media/mmcblk1p1/ -r
rm /media/mmcblk1p1/*.sh -fr
echo ---------copy over
ls /media/mmcblk1p1/
